change to use redis.ConnectionPool

Brightcells 8 lat temu
rodzic
commit
40165198cd
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      pai2/func_settings.py

+ 2 - 2
pai2/func_settings.py

@@ -4,9 +4,9 @@ import redis
4 4
 
5 5
 
6 6
 def redis_connect(conf):
7
-    return redis.StrictRedis(**{
7
+    return redis.StrictRedis(connection_pool=redis.ConnectionPool(**{
8 8
         'host': conf.get('HOST', 'localhost'),
9 9
         'port': conf.get('PORT', 6379),
10 10
         'password': '{}:{}'.format(conf.get('USER', ''), conf.get('PASSWORD', '')) if conf.get('USER') else '',
11 11
         'db': conf.get('db', 0),
12
-    })
12
+    }))